package br.edu.utfpr.backupTools.view.telas.principal.tabela;

import java.util.List;

import javax.swing.table.AbstractTableModel;

import br.edu.utfpr.backupTools.model.pojo.Backup;

public class BackupTableModel extends AbstractTableModel {
	List backups;
	
	public BackupTableModel(List backups){
		this.backups = backups;
	}
	
	public Class getColumnClass(int columnIndex) { return Backup.class; }
    
	public int getColumnCount() { return 1; }
    
	public String getColumnName(int columnIndex) { return ""; }
    
	public int getRowCount() { return (backups == null) ? 0 : backups.size(); }
    
	public Object getValueAt(int rowIndex, int columnIndex) { return (backups == null) ? null : backups.get(rowIndex); }
    
	public boolean isCellEditable(int columnIndex, int rowIndex) { return true; }

}
